﻿<u:UObject x:Class="UTable.Tests.UScrollViewerTest"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:u="clr-namespace:UTable.Objects.Controls;assembly=UTable.Core"
    Height="400" Width="520">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="180" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="50" />
                <RowDefinition Height="50" />
                <RowDefinition Height="50" />
                <RowDefinition Height="50" />
                <RowDefinition Height="50" />
                <RowDefinition Height="50" />
                <RowDefinition Height="50" />
            </Grid.RowDefinitions>
            <u:URadioButton Grid.Row="1" Foreground="White" FontSize="16" x:Name="BarRadio" Checked="BarRadio_Checked">Scroll By Bar</u:URadioButton>
            <u:URadioButton Grid.Row="2" Foreground="White" FontSize="16" x:Name="ContentRadio" Checked="ContentRadio_Checked" IsChecked="True">Scroll By Content</u:URadioButton>
            <u:UCheckBox Grid.Row="4" Foreground="White" FontSize="16" x:Name="ScrollWidthCheck" Checked="ScrollWidthCheck_Checked" Unchecked="ScrollWidthCheck_Unchecked">Scroll Width</u:UCheckBox>
            <u:UCheckBox Grid.Row="5" Foreground="White" FontSize="16" x:Name="ScrollHeightCheck" Checked="ScrollHeightCheck_Checked" Unchecked="ScrollHeightCheck_Unchecked" IsChecked="True">Scroll Height</u:UCheckBox>
        </Grid>
        <Border Grid.Column="1" Margin="10">
            <u:UScrollViewer Grid.Column="1" x:Name="ScrollViewer">
                <u:UCanvas Background="Pink" Width="300" Height="1000" x:Name="ScrollCanvas">
                    <u:UButton Width="100" Height="50" Canvas.Left="0" Canvas.Top="50" Background="Azure" >Button S1</u:UButton>
                    <u:UButton Width="100" Height="50" Canvas.Left="0" Canvas.Top="150">Button S2</u:UButton>
                    <u:UButton Width="100" Height="50" Canvas.Left="0" Canvas.Top="250">Button S2</u:UButton>
                    <u:UButton Width="100" Height="50" Canvas.Left="0" Canvas.Top="350">Button S2</u:UButton>
                    <u:UButton Width="100" Height="50" Canvas.Left="0" Canvas.Top="550">Button S2</u:UButton>
                    <u:UButton Width="100" Height="50" Canvas.Left="0" Canvas.Top="750">Button S2</u:UButton>
                    <u:UButton Width="100" Height="50" Canvas.Left="0" Canvas.Top="950">Button S2</u:UButton>
                </u:UCanvas>
            </u:UScrollViewer>
        </Border>
    </Grid>
</u:UObject>
